﻿using System.Linq;
using Caliburn.Micro;
using Chicken4wp.Entities;

namespace Chicken4wp.ViewModels
{
    public class MainPageViewModel
    {
        public MainPageViewModel(INavigationService navigationService)
        {
            var currentProxy = ChickenDataContext.Instance.Settings.FirstOrDefault
                (s => s.Type == SettingType.ProxySetting && s.IsEnabled && s.IsInUsed);
            if (currentProxy != null && currentProxy.Data != null)
            {

            }
            else
            {
                navigationService.UriFor<ProxySettingPageViewModel>().Navigate();
            }
        }
    }
}
